const storage: any = {
  set(key: string, value: any) {
    localStorage.setItem(key, JSON.stringify(value))
  },
  get(key: string) {
    const getItem: any | null = localStorage.getItem(key) || null
    return JSON.parse(getItem)
  },
  remove(key: string) {
    localStorage.removeItem(key)
  },
  check(key: string) {
    const getItem: any | null = localStorage.getItem(key) || null
    return JSON.parse(getItem) ? true : false
  },
}
export default storage
